package com.john.utils.common;

import java.io.InputStream;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

/**
 * 读取Properties文件
 */
public class PropertiesUtils {

	/**
	 * 获取propertie
	 * @param key
	 * @return
	 */
	public static String getProperties(String key,String PropertieName){
		try {
			InputStream in = StreamUtils.getFileInputStream(PropertieName+".properties");
			ResourceBundle rb = new PropertyResourceBundle(in);
			return rb.getString(key);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
	}

}
